package com.dealin.writer.recyclerView;

import android.content.Context;
import android.graphics.Color;
import android.view.View;
import android.widget.ImageView;

import com.dealin.writer.R;
import com.dealin.writer.bean.Project;
import com.toshiba.adapter.MyRecycleViewAdapter;
import com.toshiba.adapter.base.BaseViewHolder;

/**
 * Created by lenovo on 2016/9/26.
 */

public class AdapterRecyclerView extends MyRecycleViewAdapter<Project>
{

    public AdapterRecyclerView(Context context) {
        super(context);
    }

    @Override
    public void onItemInflate(int position, Project item, BaseViewHolder viewHolder, View rootView) {
        viewHolder.setTextView(R.id.projectNameTv, item.getName());
        viewHolder.setTextView(R.id.projectAuthorTv,item.getAuthor());
        ((ImageView)viewHolder.getView(R.id.projectLockIv)).setColorFilter(Color.BLUE);
    }

    @Override
    public int getItemLayout(int viewType) {
        return R.layout.project_item;
    }


}